﻿using LJ.Abstractions.Config;
using LJ.Abstractions.Extensions;
using LJ.AspNetCore.Abstractions.Pack;
using Microsoft.AspNetCore.Builder;

namespace LJ.Host.Web.Pack;

public class AspNetCorePackProvider(WebApplication webApplication) : IAspNetCorePackProvider
{
    public IApplicationBuilder ApplicationBuilder { get; } = webApplication;

    public IEndpointRouteBuilder EndpointRouteBuilder { get; } = webApplication;
    public ILogger Logger { get; } = webApplication.Logger;

    public IConfigProvider ConfigProvider { get; } = webApplication.Services.GetRequiredService<IConfigProvider>();

    public IServiceProvider ServiceProvider { get; } = webApplication.Services;

}